package com.example.produces.service.impl;

import com.example.produces.entity.RawReturn;
import com.example.produces.mapper.RawReturnMapper;
import com.example.produces.service.RawReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RawReturnImpl implements RawReturnService {
    @Autowired
    private RawReturnMapper rawReturnMapper;
    @Override
    public List<RawReturn> findAll() {
        List<RawReturn> rawReturns=rawReturnMapper.findAll();
        return rawReturns;
    }

    @Override
    public void add(RawReturn rawReturn) {
            rawReturnMapper.add(rawReturn);
    }

    @Override
    public RawReturn findOne(String name) {
        return rawReturnMapper.findOne(name);
    }

    @Override
    public void upDate(RawReturn rawReturn) {
       rawReturnMapper.upDate(rawReturn);
    }

    @Override
    public void delete(String name) {
       rawReturnMapper.delete(name);
    }
}
